<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<title>Data Structures for Sets and Graphs: datastruct/DirectlyAddressedSet.h Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">Data Structures for Sets and Graphs
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.1.1 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Macros</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_f9af7c4329e6f916a6a58dc83cbb7ef1.html">datastruct</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">DirectlyAddressedSet.h</div>  </div>
</div><!--header-->
<div class="contents">
<a href="DirectlyAddressedSet_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*</span></div>
<div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> * DirectlyAddressedSet.h</span></div>
<div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *</span></div>
<div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *  Created on: 30/08/2012</span></div>
<div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *      Author: marcio</span></div>
<div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> */</span></div>
<div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;</div>
<div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="preprocessor">#ifndef DRIECTLYADDRESSEDSET_H_</span></div>
<div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="preprocessor"></span><span class="preprocessor">#define DRIECTLYADDRESSEDSET_H_</span></div>
<div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="preprocessor"></span></div>
<div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="preprocessor">#include &lt;cstdlib&gt;</span></div>
<div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="preprocessor">#include &lt;<a class="code" href="Factory_8h.html">Factory.h</a>&gt;</span></div>
<div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;</div>
<div class="line"><a name="l00033"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html">   33</a></span>&#160;<span class="keyword">class </span><a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> {</div>
<div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;</div>
<div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00055"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet_1_1Iterator.html">   55</a></span>&#160;        <span class="keyword">class </span><a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">Iterator</a> {</div>
<div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;        <span class="keyword">protected</span>:</div>
<div class="line"><a name="l00057"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#acc93f949a845d47f30ee6f6c75334577">   57</a></span>&#160;                <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#acc93f949a845d47f30ee6f6c75334577">Iterator</a>() {};</div>
<div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;        <span class="keyword">public</span>:</div>
<div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;</div>
<div class="line"><a name="l00065"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#aed6d9cffc7ce084fc3a4607ac9e7658d">   65</a></span>&#160;                <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#aed6d9cffc7ce084fc3a4607ac9e7658d" title="The destructor.">~Iterator</a>() {};</div>
<div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;</div>
<div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;                <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ae4eb65beabbaa126db89529f3d3e2f3a" title="Restarts the enumeration.">restart</a>();</div>
<div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;</div>
<div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;                <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#a1421c0a751aafa1de9cd0bed72bd2bdd" title="Restarts the enumeration from a specified value (which is not required to be a key in the universe)...">restartFrom</a>(<span class="keywordtype">long</span> from) = 0;</div>
<div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;</div>
<div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;                <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>() = 0;</div>
<div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;</div>
<div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;                <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#aec520a3f6d74fabb6d378051b070a22b" title="Enumerates the first key in the set next to the current cursor position up to a specified value...">nextUpTo</a>(<span class="keywordtype">long</span> to) = 0;</div>
<div class="line"><a name="l00118"></a><span class="lineno">  118</span>&#160;        };</div>
<div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;</div>
<div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;<span class="keyword">protected</span>:</div>
<div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;</div>
<div class="line"><a name="l00122"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a72575479afb5dd067267fa92913bc80a">  122</a></span>&#160;        <span class="keyword">const</span> <span class="keywordtype">long</span>      <a class="code" href="classDirectlyAddressedSet.html#a72575479afb5dd067267fa92913bc80a" title="the size of the universe">u</a>;                      </div>
<div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;</div>
<div class="line"><a name="l00124"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a27a20af4d1294aaf58d199116393b459">  124</a></span>&#160;        <span class="keyword">static</span> <span class="keywordtype">char</span> *           <a class="code" href="classDirectlyAddressedSet.html#a27a20af4d1294aaf58d199116393b459" title="to be returned by toArray()">bitvector</a>;      </div>
<div class="line"><a name="l00125"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#aa7d3386c32161ef55855487251d4d990">  125</a></span>&#160;        <span class="keyword">static</span> <span class="keywordtype">int</span>                      <a class="code" href="classDirectlyAddressedSet.html#aa7d3386c32161ef55855487251d4d990" title="size of vEBTree&lt;T&gt;::bitvector, in number of bytes">nbv</a>;            </div>
<div class="line"><a name="l00126"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733">  126</a></span>&#160;        Iterator * <span class="keyword">const</span>        <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>;          </div>
<div class="line"><a name="l00127"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a663e401ccbabdf2583d8011c20b4997d">  127</a></span>&#160;        Iterator * <span class="keyword">const</span>        <a class="code" href="classDirectlyAddressedSet.html#a663e401ccbabdf2583d8011c20b4997d" title="internal iterator used to implement stateless enumeration methods on the complement of this set...">complIt</a>;        </div>
<div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;</div>
<div class="line"><a name="l00137"></a><span class="lineno">  137</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ad5b694fa37b9b6d2fe79ddee76724de5" title="Basic constructor.">DirectlyAddressedSet</a>(<span class="keywordtype">long</span> size);</div>
<div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;</div>
<div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;</div>
<div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet.html#a88d7e26e952770c53a961e98c17a41c7" title="Destructor.">~DirectlyAddressedSet</a>();</div>
<div class="line"><a name="l00147"></a><span class="lineno">  147</span>&#160;</div>
<div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * <a class="code" href="classDirectlyAddressedSet.html#a849f2439a4b639973e8f85652394b70f" title="Creates a copy of this object.">clone</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div>
<div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">DirectlyAddressedSet::Iterator</a>* <a class="code" href="classDirectlyAddressedSet.html#acabc40612169e2623d80b19c784e551a" title="Starts a new iterator for this set.">newIterator</a>() = 0;</div>
<div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;</div>
<div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">DirectlyAddressedSet::Iterator</a>* <a class="code" href="classDirectlyAddressedSet.html#a2467222186e9bf62f8ca6daabe3628f9" title="An Iterator for the complement of the set represented by the object.">newComplIterator</a>() = 0;</div>
<div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;</div>
<div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a3729ca91844f9307afe06f93067e5b2f" title="Determines the next key in the set, in ascending order, of the specified value.">nextOf</a>(<span class="keywordtype">long</span> i);</div>
<div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;</div>
<div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classDirectlyAddressedSet.html#ac579abc5639d6b55f3d16a177e88ad40" title="Verify if a element of the universe is in the set.">isInSet</a>(<span class="keywordtype">long</span> i) <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;</div>
<div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">char</span> * <a class="code" href="classDirectlyAddressedSet.html#a53b903fb7339a9cfa0b97242f984b01c" title="Create a vector of the elements in the set.">toArray</a>(<span class="keywordtype">long</span>* size) = 0;</div>
<div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;</div>
<div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;</div>
<div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classDirectlyAddressedSet.html#ab17ea6e0af7dc026fb12d267c6849530" title="Checks whether this set is empty.">isEmpty</a>() <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;</div>
<div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * <a class="code" href="classDirectlyAddressedSet.html#a3a433c49b02c6e0f582b2e9ed60fac4e" title="Subset containing the elements between the specified values.">subset</a>(<span class="keywordtype">long</span> from, <span class="keywordtype">long</span> to) <span class="keyword">const</span> = 0;</div>
<div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;</div>
<div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#af430216503558a4cfb9b4647ec9c2646" title="The complement of the current set, stored in the set res.">getComplement</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * res) = 0;</div>
<div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;</div>
<div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a65c7a90ea3d3c767a2a8dbe0f9cde2ee" title="Adds the specified key to the set (optional operation).">toSet</a>(<span class="keywordtype">long</span> i) = 0;</div>
<div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;</div>
<div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#afe74e2eeeee28e478c34669899dc96fd" title="Removes the specified key from the set (optional operation).">toCompl</a>(<span class="keywordtype">long</span> i) = 0;</div>
<div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;</div>
<div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a0f014bb0aa9685b3eb7c5dc34c35042d" title="Swap a element between the set and the complement (optional operation).">flip</a>(<span class="keywordtype">long</span> i) = 0;</div>
<div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;</div>
<div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#aef0b3fb51862f67e872bd9c984e18b7c" title="Add all the elements in the universe to the set (optional operation)">allToSet</a>() = 0;</div>
<div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;</div>
<div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a07ad3c0c3ca7df962ad9af56df76a098" title="Add all the elements in the universe to the complement (optional operation)">allToCompl</a>() = 0;</div>
<div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;</div>
<div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a254e14e6aad4b4b7969acf896fd750a2" title="The complement of the current set (optional operation)">flipAll</a>() = 0;</div>
<div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;</div>
<div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#ace4dc1b4e41e18d0c7cef3fa17c64dc5" title="Union of the current set and a specified set (optional operation).">addAll</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v);</div>
<div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;</div>
<div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a385114535ad6bc398181459b1b01c75a" title="Symmetric difference of the current set and a specified set (optional operation)">symDiff</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v);</div>
<div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div>
<div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#af45e06fe443a71cb91635ddd397ec35f" title="Difference of the current set and a specified set (optional operation)">removeAll</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v);</div>
<div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;</div>
<div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a722dd648d9caa8449f26741f53b85ba2" title="Intersection of the current set and a specified set (optional operation)">retainAll</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v);</div>
<div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;</div>
<div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a574cd41ea4981a5ff94ce64337eb0cdf" title="Adds to this set all the elements in the union of two specified sets (optional operation)">unionOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w);</div>
<div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;</div>
<div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a49b2feab5c731dc3d2b3ff316597345a" title="Adds to this set all the elements in the symmetric difference of two specified sets (optional operati...">symDiffOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w);</div>
<div class="line"><a name="l00391"></a><span class="lineno">  391</span>&#160;</div>
<div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#aaf806e606c647a25918827d95467db5d" title="Adds to this set all the elements in the intersection of two specified sets (optional operation)...">intersectOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w);</div>
<div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;</div>
<div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#ad671fb37b8eee9801d1550fe92504ab0" title="Adds to this set all the elements in the difference of two specified sets (optional operation)...">diffOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w);</div>
<div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;</div>
<div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a6ab0477539b69fb94e8b8bca622cc187" title="Determine the first element of the set represented by the current object.">firstInSet</a>();</div>
<div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;</div>
<div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a798e2503651986e33dd7af1e510f50a6" title="Determine the first element of the complement of the set represented by the current object...">firstInCompl</a>() = 0;</div>
<div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;</div>
<div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a3340fde7ad523ac0c3e121b898be1e3c" title="The cardinality of the set represented by the object.">cardOfSet</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00451"></a><span class="lineno">  451</span>&#160;</div>
<div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;        <span class="keyword">virtual</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a86fbb2d9a8fc212f513d0ded3bee67dc" title="The cardinality of the complement of the set represented by the object.">cardOfCompl</a>() <span class="keyword">const</span>;</div>
<div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;</div>
<div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;};</div>
<div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div>
<div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;<span class="keywordtype">char</span> * <a class="code" href="classDirectlyAddressedSet.html#a27a20af4d1294aaf58d199116393b459" title="to be returned by toArray()">DirectlyAddressedSet::bitvector</a> = NULL;</div>
<div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;<span class="keywordtype">int</span> <a class="code" href="classDirectlyAddressedSet.html#aa7d3386c32161ef55855487251d4d990" title="size of vEBTree&lt;T&gt;::bitvector, in number of bytes">DirectlyAddressedSet::nbv</a> = 0;</div>
<div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;</div>
<div class="line"><a name="l00469"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#ad5b694fa37b9b6d2fe79ddee76724de5">  469</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classDirectlyAddressedSet.html#ad5b694fa37b9b6d2fe79ddee76724de5" title="Basic constructor.">DirectlyAddressedSet::DirectlyAddressedSet</a>(<span class="keywordtype">long</span> size) : u(size), setIt(newIterator()), complIt(newComplIterator()) {</div>
<div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;</div>
<div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;}</div>
<div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;</div>
<div class="line"><a name="l00473"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a88d7e26e952770c53a961e98c17a41c7">  473</a></span>&#160;<span class="keyword">inline</span> <a class="code" href="classDirectlyAddressedSet.html#a88d7e26e952770c53a961e98c17a41c7" title="Destructor.">DirectlyAddressedSet::~DirectlyAddressedSet</a>() {</div>
<div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;        <span class="keyword">delete</span> <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>;</div>
<div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;        <span class="keyword">delete</span> <a class="code" href="classDirectlyAddressedSet.html#a663e401ccbabdf2583d8011c20b4997d" title="internal iterator used to implement stateless enumeration methods on the complement of this set...">complIt</a>;</div>
<div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;}</div>
<div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;</div>
<div class="line"><a name="l00478"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ae4eb65beabbaa126db89529f3d3e2f3a">  478</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ae4eb65beabbaa126db89529f3d3e2f3a" title="Restarts the enumeration.">DirectlyAddressedSet::Iterator::restart</a>() {</div>
<div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;        <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#a1421c0a751aafa1de9cd0bed72bd2bdd" title="Restarts the enumeration from a specified value (which is not required to be a key in the universe)...">restartFrom</a>(0);</div>
<div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;}</div>
<div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;</div>
<div class="line"><a name="l00482"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a3729ca91844f9307afe06f93067e5b2f">  482</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a3729ca91844f9307afe06f93067e5b2f" title="Determines the next key in the set, in ascending order, of the specified value.">DirectlyAddressedSet::nextOf</a>(<span class="keywordtype">long</span> i) {</div>
<div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#a1421c0a751aafa1de9cd0bed72bd2bdd" title="Restarts the enumeration from a specified value (which is not required to be a key in the universe)...">restartFrom</a>(i);</div>
<div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;}</div>
<div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;</div>
<div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;</div>
<div class="line"><a name="l00488"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924">  488</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">DirectlyAddressedSet::universeSize</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classDirectlyAddressedSet.html#a72575479afb5dd067267fa92913bc80a" title="the size of the universe">u</a>;</div>
<div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;}</div>
<div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;</div>
<div class="line"><a name="l00492"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#ab17ea6e0af7dc026fb12d267c6849530">  492</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="classDirectlyAddressedSet.html#ab17ea6e0af7dc026fb12d267c6849530" title="Checks whether this set is empty.">DirectlyAddressedSet::isEmpty</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classDirectlyAddressedSet.html#a3340fde7ad523ac0c3e121b898be1e3c" title="The cardinality of the set represented by the object.">cardOfSet</a>() == 0;</div>
<div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;}</div>
<div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;</div>
<div class="line"><a name="l00496"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#ace4dc1b4e41e18d0c7cef3fa17c64dc5">  496</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#ace4dc1b4e41e18d0c7cef3fa17c64dc5" title="Union of the current set and a specified set (optional operation).">DirectlyAddressedSet::addAll</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v) {</div>
<div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;        <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">Iterator</a>* it = v-&gt;<a class="code" href="classDirectlyAddressedSet.html#acabc40612169e2623d80b19c784e551a" title="Starts a new iterator for this set.">newIterator</a>();</div>
<div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;        <span class="keywordtype">long</span> i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;        <span class="keywordflow">while</span> (i &lt; v-&gt;<a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>()) {</div>
<div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;                <a class="code" href="classDirectlyAddressedSet.html#a65c7a90ea3d3c767a2a8dbe0f9cde2ee" title="Adds the specified key to the set (optional operation).">toSet</a>(i);</div>
<div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;                i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;        }</div>
<div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;        <span class="keyword">delete</span> it;</div>
<div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;}</div>
<div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;</div>
<div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;</div>
<div class="line"><a name="l00507"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a385114535ad6bc398181459b1b01c75a">  507</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a385114535ad6bc398181459b1b01c75a" title="Symmetric difference of the current set and a specified set (optional operation)">DirectlyAddressedSet::symDiff</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v) {</div>
<div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;        <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">Iterator</a>* it = v-&gt;<a class="code" href="classDirectlyAddressedSet.html#acabc40612169e2623d80b19c784e551a" title="Starts a new iterator for this set.">newIterator</a>();</div>
<div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;        <span class="keywordtype">long</span> i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;        <span class="keywordflow">while</span> (i &lt; v-&gt;<a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>()) {</div>
<div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;                <a class="code" href="classDirectlyAddressedSet.html#a0f014bb0aa9685b3eb7c5dc34c35042d" title="Swap a element between the set and the complement (optional operation).">flip</a>(i);</div>
<div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;                i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;        }</div>
<div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;        <span class="keyword">delete</span> it;</div>
<div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;}</div>
<div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;</div>
<div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;</div>
<div class="line"><a name="l00518"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a722dd648d9caa8449f26741f53b85ba2">  518</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a722dd648d9caa8449f26741f53b85ba2" title="Intersection of the current set and a specified set (optional operation)">DirectlyAddressedSet::retainAll</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v) {</div>
<div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ae4eb65beabbaa126db89529f3d3e2f3a" title="Restarts the enumeration.">restart</a>();</div>
<div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;        <span class="keywordtype">long</span> i = <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;        <span class="keywordflow">while</span> (i &lt; <a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>()) {</div>
<div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;                <span class="keywordflow">if</span> (!v-&gt;<a class="code" href="classDirectlyAddressedSet.html#ac579abc5639d6b55f3d16a177e88ad40" title="Verify if a element of the universe is in the set.">isInSet</a>(i)) {</div>
<div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;                        <a class="code" href="classDirectlyAddressedSet.html#afe74e2eeeee28e478c34669899dc96fd" title="Removes the specified key from the set (optional operation).">toCompl</a>(i);</div>
<div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;                        <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#a1421c0a751aafa1de9cd0bed72bd2bdd" title="Restarts the enumeration from a specified value (which is not required to be a key in the universe)...">restartFrom</a>(i);</div>
<div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;                }</div>
<div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;                i = <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;        }</div>
<div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;}</div>
<div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;</div>
<div class="line"><a name="l00530"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#af45e06fe443a71cb91635ddd397ec35f">  530</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#af45e06fe443a71cb91635ddd397ec35f" title="Difference of the current set and a specified set (optional operation)">DirectlyAddressedSet::removeAll</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v) {</div>
<div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;        <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">Iterator</a>* it = v-&gt;<a class="code" href="classDirectlyAddressedSet.html#acabc40612169e2623d80b19c784e551a" title="Starts a new iterator for this set.">newIterator</a>();</div>
<div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;        <span class="keywordtype">long</span> i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;        <span class="keywordflow">while</span> (i &lt; <a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>()) {</div>
<div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;                <a class="code" href="classDirectlyAddressedSet.html#afe74e2eeeee28e478c34669899dc96fd" title="Removes the specified key from the set (optional operation).">toCompl</a>(i);</div>
<div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;                i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;        }</div>
<div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;}</div>
<div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;</div>
<div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;</div>
<div class="line"><a name="l00540"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a574cd41ea4981a5ff94ce64337eb0cdf">  540</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a574cd41ea4981a5ff94ce64337eb0cdf" title="Adds to this set all the elements in the union of two specified sets (optional operation)">DirectlyAddressedSet::unionOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w) {</div>
<div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ace4dc1b4e41e18d0c7cef3fa17c64dc5" title="Union of the current set and a specified set (optional operation).">addAll</a>(v);</div>
<div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ace4dc1b4e41e18d0c7cef3fa17c64dc5" title="Union of the current set and a specified set (optional operation).">addAll</a>(w);</div>
<div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;}</div>
<div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;</div>
<div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;</div>
<div class="line"><a name="l00546"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a49b2feab5c731dc3d2b3ff316597345a">  546</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#a49b2feab5c731dc3d2b3ff316597345a" title="Adds to this set all the elements in the symmetric difference of two specified sets (optional operati...">DirectlyAddressedSet::symDiffOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w) {</div>
<div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ace4dc1b4e41e18d0c7cef3fa17c64dc5" title="Union of the current set and a specified set (optional operation).">addAll</a>(v);</div>
<div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#a385114535ad6bc398181459b1b01c75a" title="Symmetric difference of the current set and a specified set (optional operation)">symDiff</a>(w);</div>
<div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;}</div>
<div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;</div>
<div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;</div>
<div class="line"><a name="l00552"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#aaf806e606c647a25918827d95467db5d">  552</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#aaf806e606c647a25918827d95467db5d" title="Adds to this set all the elements in the intersection of two specified sets (optional operation)...">DirectlyAddressedSet::intersectOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w) {</div>
<div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;        <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">Iterator</a>* it = v-&gt;<a class="code" href="classDirectlyAddressedSet.html#acabc40612169e2623d80b19c784e551a" title="Starts a new iterator for this set.">newIterator</a>();</div>
<div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;        <span class="keywordtype">long</span> i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;        <span class="keywordflow">while</span> (i &lt; v-&gt;<a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>()) {</div>
<div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;                <span class="keywordflow">if</span> (w-&gt;<a class="code" href="classDirectlyAddressedSet.html#ac579abc5639d6b55f3d16a177e88ad40" title="Verify if a element of the universe is in the set.">isInSet</a>(i)) {</div>
<div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;                        <a class="code" href="classDirectlyAddressedSet.html#a65c7a90ea3d3c767a2a8dbe0f9cde2ee" title="Adds the specified key to the set (optional operation).">toSet</a>(i);</div>
<div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;                        it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#a1421c0a751aafa1de9cd0bed72bd2bdd" title="Restarts the enumeration from a specified value (which is not required to be a key in the universe)...">restartFrom</a>(i);</div>
<div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;                }</div>
<div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;                i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;        }</div>
<div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;        <span class="keyword">delete</span> it;</div>
<div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;}</div>
<div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;</div>
<div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;</div>
<div class="line"><a name="l00566"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#ad671fb37b8eee9801d1550fe92504ab0">  566</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#ad671fb37b8eee9801d1550fe92504ab0" title="Adds to this set all the elements in the difference of two specified sets (optional operation)...">DirectlyAddressedSet::diffOf</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * v, <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * w) {</div>
<div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;        <a class="code" href="classDirectlyAddressedSet_1_1Iterator.html" title="A general iterator to scan a DirectlyAddressedSet.">Iterator</a>* it = v-&gt;<a class="code" href="classDirectlyAddressedSet.html#acabc40612169e2623d80b19c784e551a" title="Starts a new iterator for this set.">newIterator</a>();</div>
<div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;        <span class="keywordtype">long</span> i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;        <span class="keywordflow">while</span> (i &lt; v-&gt;<a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>()) {</div>
<div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;                <span class="keywordflow">if</span> (!w-&gt;<a class="code" href="classDirectlyAddressedSet.html#ac579abc5639d6b55f3d16a177e88ad40" title="Verify if a element of the universe is in the set.">isInSet</a>(i)) {</div>
<div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;                        <a class="code" href="classDirectlyAddressedSet.html#a65c7a90ea3d3c767a2a8dbe0f9cde2ee" title="Adds the specified key to the set (optional operation).">toSet</a>(i);</div>
<div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;                        it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#a1421c0a751aafa1de9cd0bed72bd2bdd" title="Restarts the enumeration from a specified value (which is not required to be a key in the universe)...">restartFrom</a>(i);</div>
<div class="line"><a name="l00573"></a><span class="lineno">  573</span>&#160;                }</div>
<div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;                i = it-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00575"></a><span class="lineno">  575</span>&#160;        }</div>
<div class="line"><a name="l00576"></a><span class="lineno">  576</span>&#160;        <span class="keyword">delete</span> it;</div>
<div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;}</div>
<div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;</div>
<div class="line"><a name="l00579"></a><span class="lineno">  579</span>&#160;</div>
<div class="line"><a name="l00580"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#af430216503558a4cfb9b4647ec9c2646">  580</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classDirectlyAddressedSet.html#af430216503558a4cfb9b4647ec9c2646" title="The complement of the current set, stored in the set res.">DirectlyAddressedSet::getComplement</a>(<a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * res) {</div>
<div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;        <span class="keywordflow">for</span>(<span class="keywordtype">long</span> i = 0; i &lt; <a class="code" href="classDirectlyAddressedSet.html#a72575479afb5dd067267fa92913bc80a" title="the size of the universe">u</a>; i++){</div>
<div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;                <span class="keywordflow">if</span> (<a class="code" href="classDirectlyAddressedSet.html#ac579abc5639d6b55f3d16a177e88ad40" title="Verify if a element of the universe is in the set.">isInSet</a>(i))</div>
<div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;                        res-&gt;<a class="code" href="classDirectlyAddressedSet.html#afe74e2eeeee28e478c34669899dc96fd" title="Removes the specified key from the set (optional operation).">toCompl</a>(i);</div>
<div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;                <span class="keywordflow">else</span></div>
<div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;                        res-&gt;<a class="code" href="classDirectlyAddressedSet.html#a65c7a90ea3d3c767a2a8dbe0f9cde2ee" title="Adds the specified key to the set (optional operation).">toSet</a>(i);</div>
<div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;        }</div>
<div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;}</div>
<div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;</div>
<div class="line"><a name="l00589"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a6ab0477539b69fb94e8b8bca622cc187">  589</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a6ab0477539b69fb94e8b8bca622cc187" title="Determine the first element of the set represented by the current object.">DirectlyAddressedSet::firstInSet</a>() {</div>
<div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ae4eb65beabbaa126db89529f3d3e2f3a" title="Restarts the enumeration.">restart</a>();</div>
<div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;}</div>
<div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;</div>
<div class="line"><a name="l00594"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a798e2503651986e33dd7af1e510f50a6">  594</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a798e2503651986e33dd7af1e510f50a6" title="Determine the first element of the complement of the set represented by the current object...">DirectlyAddressedSet::firstInCompl</a>() {</div>
<div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#a663e401ccbabdf2583d8011c20b4997d" title="internal iterator used to implement stateless enumeration methods on the complement of this set...">complIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ae4eb65beabbaa126db89529f3d3e2f3a" title="Restarts the enumeration.">restart</a>();</div>
<div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classDirectlyAddressedSet.html#a663e401ccbabdf2583d8011c20b4997d" title="internal iterator used to implement stateless enumeration methods on the complement of this set...">complIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;}</div>
<div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;</div>
<div class="line"><a name="l00599"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a3340fde7ad523ac0c3e121b898be1e3c">  599</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a3340fde7ad523ac0c3e121b898be1e3c" title="The cardinality of the set represented by the object.">DirectlyAddressedSet::cardOfSet</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;        <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ae4eb65beabbaa126db89529f3d3e2f3a" title="Restarts the enumeration.">restart</a>();</div>
<div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;        <span class="keywordtype">long</span> i = <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;        <span class="keywordtype">long</span> count = 0;</div>
<div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;        <span class="keywordflow">while</span> (i &lt; <a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>()) {</div>
<div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;                count++;</div>
<div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;                i = <a class="code" href="classDirectlyAddressedSet.html#ab50aba05f27ce2c0f6b1627df11b8733" title="internal iterator used to implement stateless enumeration methods on this set">setIt</a>-&gt;<a class="code" href="classDirectlyAddressedSet_1_1Iterator.html#ab3ef5a45f421b1f1b2875e60977aafc7" title="Enumerates the first key in the set next to the current cursor position.">next</a>();</div>
<div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;        }</div>
<div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;</div>
<div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;        <span class="keywordflow">return</span> count;</div>
<div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;}</div>
<div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;</div>
<div class="line"><a name="l00611"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSet.html#a86fbb2d9a8fc212f513d0ded3bee67dc">  611</a></span>&#160;<span class="keyword">inline</span> <span class="keywordtype">long</span> <a class="code" href="classDirectlyAddressedSet.html#a86fbb2d9a8fc212f513d0ded3bee67dc" title="The cardinality of the complement of the set represented by the object.">DirectlyAddressedSet::cardOfCompl</a>()<span class="keyword"> const </span>{</div>
<div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;        <span class="keywordflow">return</span> <a class="code" href="classDirectlyAddressedSet.html#a68b2f85831f12352973e8f64fb61a924" title="The size of the universe.">universeSize</a>() - <a class="code" href="classDirectlyAddressedSet.html#a3340fde7ad523ac0c3e121b898be1e3c" title="The cardinality of the set represented by the object.">cardOfSet</a>();</div>
<div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;}</div>
<div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;</div>
<div class="line"><a name="l00615"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSetFactory.html">  615</a></span>&#160;<span class="keyword">class </span><a class="code" href="classDirectlyAddressedSetFactory.html">DirectlyAddressedSetFactory</a> : <span class="keyword">public</span> <a class="code" href="classFactory.html">Factory</a>&lt;DirectlyAddressedSet&gt; {</div>
<div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;<span class="keyword">public</span>:</div>
<div class="line"><a name="l00617"></a><span class="lineno"><a class="code" href="classDirectlyAddressedSetFactory.html#afdaa4fe6e55976df3e53181dbd0fd49f">  617</a></span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSetFactory.html#afdaa4fe6e55976df3e53181dbd0fd49f">~DirectlyAddressedSetFactory</a>() {};</div>
<div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;</div>
<div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * newInstance(<span class="keywordtype">long</span> n) = 0;</div>
<div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;        <span class="keyword">virtual</span> <a class="code" href="classDirectlyAddressedSet.html" title="A static or dynamic set of elements with direct addressing.">DirectlyAddressedSet</a> * newInstance(<span class="keywordtype">long</span> n, <span class="keywordtype">void</span> * handle) = 0;</div>
<div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;};</div>
<div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;</div>
<div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;<span class="preprocessor">#endif </span><span class="comment">/* DRIECTLYADDRESSEDSET_H_ */</span><span class="preprocessor"></span></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Mon Nov 26 2012 17:06:45 for Data Structures for Sets and Graphs by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.1.1
</small></address>
</body>
</html>
